<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="author" content="viggo"/>
    <title>{{ .ConfigSite.SiteTitle }}</title>
    <meta name="keywords" content="{{ .ConfigSite.SiteKeyword }}">
    <meta name="description" content="{{ .ConfigSite.SiteDesc }}">

    {{ if .ConfigSite.SiteFavicon }}
        <link rel="shortcut icon" href="data:image/png;base64,{{ .ConfigSite.SiteFavicon }}">
    {{ else }}
        <link rel="shortcut icon" href="/assets/static/index/images/favicon.png">
    {{ end }}

    <link rel="stylesheet" href="/assets/static/index/css/fonts/linecons/css/linecons.css">
    <link rel="stylesheet" href="/assets/static/index/css/fonts/fontawesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/assets/static/index/css/bootstrap.css">
    <link rel="stylesheet" href="/assets/static/index/css/xenon-core.css">
    <link rel="stylesheet" href="/assets/static/index/css/xenon-components.css">
    <link rel="stylesheet" href="/assets/static/index/css/xenon-skins.css">
    <link rel="stylesheet" href="/assets/static/index/css/nav.css">
    <link rel="stylesheet" href="/assets/static/index/css/hclonely.css">
    <script src="assets/static/index/js/jquery-1.11.1.min.js"></script>
    <script>
        var userDefinedSearchData = {
            "custom": false,
            "thisSearch": "https://www.baidu.com/s?wd=",
            "thisSearchIcon": "url(https://www.baidu.com/favicon.ico)",
            "hotStatus": true,
            "data": [{"name": "百度", "img": "url(https://www.baidu.com/favicon.ico)", "url": "https://www.baidu.com/s?wd="}]
        };
    </script>
    <script src="assets/static/index/js/header.js"></script>
</head>

<body class="page-body">
<!-- skin-white -->
<div class="page-container">
    <div class="sidebar-menu toggle-others fixed">
        <div class="sidebar-menu-inner">
            <header class="logo-env">
                <!-- logo -->
                <div class="logo">
                    <a href="/" class="logo-expanded">
                        {{ if .ConfigSite.SiteLogo }}
                            <img src="data:image/png;base64,{{ .ConfigSite.SiteLogo }}" width="100%" alt=""/>
                        {{ else }}
                            <img src="assets/static/index/images/logo@2x.png" width="100%" alt=""/>
                        {{ end }}
                    </a>
                    <a href="index.html" class="logo-collapsed">
                        <img src="assets/static/index/images/logo-collapsed@2x.png" width="40" alt=""/>
                    </a>
                </div>
                <div class="mobile-menu-toggle visible-xs">
                    <a href="#" data-toggle="user-info-menu">
                        <i class="linecons-cog"></i>
                    </a>
                    <a href="#" data-toggle="mobile-menu">
                        <i class="fa-bars"></i>
                    </a>
                </div>
            </header>
            <ul id="main-menu" class="main-menu">
                {{ range .CategoryTree }}
                {{ if .Child }}
                <li>
                    <a>
                        <i class="{{ .Icon }}"></i>
                        <span class="title">{{ .Name }}</span>
                    </a>
                    <ul>
                        {{ range .Child }}
                        <li>
                            <a href="#{{ .Name }}" class="smooth"><span class="title">{{ .Name }}</span></a>
                        </li>
                        {{ end }}
                    </ul>
                </li>
                {{ else }}
                <li>
                    <a href="#{{ .Name }}" class="smooth">
                        <i class="{{ .Icon }}"></i>
                        <span class="title">{{.Name}}</span>
                    </a>
                </li>
                {{ end }}
                {{ end }}

                {{ if .About.IsAbout }}
                <li>
                    <a href="/about">
                        <i class="lni lni-heart"></i>
                        <span class="tooltip-blue">关于本站</span>
                        <span class="label label-Primary pull-right hidden-collapsed">♥︎</span>
                    </a>
                </li>
                {{ end }}
            </ul>
        </div>
    </div>
    <div class="main-content">
        <nav class="navbar user-info-navbar" role="navigation">
            <!-- User Info, Notifications and Menu Bar -->
            <!-- Left links for user info navbar -->
            <ul class="user-info-menu left-links list-inline list-unstyled">
                <li class="hidden-sm hidden-xs">
                    <a href="#" data-toggle="sidebar">
                        <i class="fa-bars"></i>
                    </a>
                </li>
                <!-- 暗黑模式 -->
                <li class="switch-mode hover-line" onclick="switchNightMode()">
                    <a href="#">
                        <svg t="1593061068148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
                             p-id="1681" width="16" height="16">
                            <path d="M582.4 326.4c-140.8 0-256 115.2-256 256s115.2 256 256 256 256-115.2 256-256-115.2-256-256-256z m0 448c-70.4 0-131.2-36.8-164.8-92.8 12.8 3.2 27.2 4.8 40 4.8 121.6 0 219.2-99.2 219.2-219.2 0-17.6-1.6-35.2-6.4-52.8 60.8 32 102.4 96 102.4 169.6 1.6 104-84.8 190.4-190.4 190.4zM582.4 262.4c17.6 0 32-14.4 32-32v-128c0-17.6-14.4-32-32-32s-32 14.4-32 32v128c0 17.6 14.4 32 32 32zM262.4 582.4c0-17.6-14.4-32-32-32h-128c-17.6 0-32 14.4-32 32s14.4 32 32 32h128c17.6 0 32-14.4 32-32zM310.4 356.8c6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6 12.8-12.8 12.8-32 0-44.8l-91.2-91.2c-12.8-12.8-32-12.8-44.8 0-12.8 12.8-12.8 32 0 44.8l91.2 91.2zM944 220.8c-12.8-12.8-32-12.8-44.8 0l-91.2 91.2c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6l91.2-91.2c12.8-12.8 12.8-33.6 0-44.8zM310.4 808l-91.2 91.2c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6l91.2-91.2c12.8-12.8 12.8-32 0-44.8-11.2-11.2-32-11.2-44.8 0z"
                                  p-id="1682" fill="#707070"></path>
                        </svg>
                    </a>
                </li>

            </ul>
            <ul class="user-info-menu right-links list-inline list-unstyled">
                <li class="hidden-sm hidden-xs">
                    <a href="https://github.com/ch3nnn/webstack-go" target="_blank">
                        <i class="fa-github"></i> GitHub
                    </a>
                </li>
            </ul>
            <!-- <a href="https://github.com/WebStackPage/WebStackPage.github.io" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a> -->

        </nav>
        <!-- 搜索 -->
        <section class="sousuo">
            <div class="search">
                <div class="search-box">
                    <span class="search-icon"
                          style="background: url(/assets/static/index/images/search_icon.png) 0px 0px; opacity: 1;"></span>
                    <input type="text" id="txt" class="search-input" autocomplete="off" placeholder="请输入关键字，按回车 / Enter 搜索">
                    <button class="search-btn" id="search-btn"><i class="fa fa-search"></i></button>
                </div>
                <!-- 搜索热词 -->
                <div class="box search-hot-text" id="box" style="display: none;">
                    <ul></ul>
                </div>
                <!-- 搜索引擎 -->
                <div class="search-engine" style="display: none;">
                    <div class="search-engine-head">
                        <strong class="search-engine-tit">选择您的默认搜索引擎：</strong>
                        <div class="search-engine-tool">
                            搜索热词： <span id="hot-btn" style="background-image: url(/assets/bootstrap/images/index/off_on.png);"></span>
                        </div>
                    </div>
                    <ul class="search-engine-list search-engine-list_zmki_ul">
                    </ul>
                </div>
            </div>
        </section>
        <script>search('/assets/static/index/images/search_icon.png')</script>
        <!-- 常用推荐 -->
        {{ range .CategorySites }}
        {{ if .SiteList }}
        <h4 class="text-gray"><i class="linecons-tag" style="margin-right: 7px;" id="{{ .Category }}"></i>{{ .Category }}</h4>
        <div class="row">
            {{ range .SiteList }}
            <div class="col-sm-3">
                <div class="xe-widget xe-conversations box2 label-info" onclick="window.open('{{ .URL }}', '_blank')"
                     data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{ .Description }}">
                    <div class="xe-comment-entry">
                        <a class="xe-user-img">
                            <img data-src="data:image/png;base64,{{ .Icon }}" class="lozad img-circle" width="40">
                        </a>
                        <div class="xe-comment">
                            <a href="#" class="xe-user-name overflowClip_1">
                                <strong>{{ .Title }}</strong>
                            </a>
                            <p class="overflowClip_2">{{ .Description }}</p>
                        </div>
                    </div>
                </div>
            </div>
            {{ end }}
        </div>
        <br/>
        {{ end }}
        {{ end }}
        <!-- END 常用推荐 -->
        <footer class="main-footer sticky footer-type-1">
            <div class="footer-inner">
                <!-- Add your copyright text here -->
                {{ if .ConfigSite.SiteRecord }}
                <div class="footer-text">
                    <strong>{{ .ConfigSite.SiteRecord }}</strong>
                </div>
                {{ else }}
                <div class="footer-text">
                    &copy; 2022-2023
                    <a href="/about">
                        <strong>WebStack-Go</strong>
                    </a>
                    design by
                    <a href="https://ch3nnn.cn" target="_blank">
                        <strong>Ch3nnn</strong>
                    </a>
                </div>
                {{ end }}
                <!-- Go to Top Link, just add rel="go-top" to any link to add this functionality -->
                <div class="go-up">
                    <a href="#" rel="go-top">
                        <i class="fa-angle-up"></i>
                    </a>
                </div>
            </div>
        </footer>
    </div>
</div>
<!-- 锚点平滑移动 -->
<script type="text/javascript">
    $(document).ready(function () {
        //img lazy loaded
        const observer = lozad();
        observer.observe();

        $(document).on('click', '.has-sub', function () {
            var _this = $(this)
            if (!$(this).hasClass('expanded')) {
                setTimeout(function () {
                    _this.find('ul').attr("style", "")
                }, 300);

            } else {
                $('.has-sub ul').each(function (id, ele) {
                    const _that = $(this);
                    if (_this.find('ul')[0] !== ele) {
                        setTimeout(function () {
                            _that.attr("style", "")
                        }, 300);
                    }
                })
            }
        })
        $('.user-info-menu .hidden-sm').click(function () {
            if ($('.sidebar-menu').hasClass('collapsed')) {
                $('.has-sub.expanded > ul').attr("style", "")
            } else {
                $('.has-sub.expanded > ul').show()
            }
        })
        $("#main-menu li ul li").click(function () {
            $(this).siblings('li').removeClass('active'); // 删除其他兄弟元素的样式
            $(this).addClass('active'); // 添加当前元素的样式
        });
        $("a.smooth").click(function (ev) {
            ev.preventDefault();

            public_vars.$mainMenu.add(public_vars.$sidebarProfile).toggleClass('mobile-is-visible');
            ps_destroy();
            $("html, body").animate({
                scrollTop: $(decodeURI($(this).attr("href"))).offset().top - 30
            }, {
                duration: 500,
                easing: "swing"
            });
        });
        return false;
    });

    var href = "";
    var pos = 0;
    $("a.smooth").click(function (e) {
        $("#main-menu li").each(function () {
            $(this).removeClass("active");
        });
        $(this).parent("li").addClass("active");
        e.preventDefault();
        href = decodeURI($(this).attr("href"));
        pos = $(href).position().top - 30;
    });
</script>
<!-- Bottom Scripts -->
<script src="assets/static/index/js/bootstrap.min.js"></script>
<script src="assets/static/index/js/TweenMax.min.js"></script>
<script src="assets/static/index/js/resizeable.js"></script>
<script src="assets/static/index/js/joinable.js"></script>
<script src="assets/static/index/js/xenon-api.js"></script>
<script src="assets/static/index/js/xenon-toggles.js"></script>
<!-- JavaScripts initializations and stuff -->
<script src="assets/static/index/js/xenon-custom.js"></script>
<script src="assets/static/index/js/lozad.js"></script>
</body>
</html>
